#! /bin/bash 

function get_items_site {
    rm -rf items
    wget http://euw.leagueoflegends.com/items
}

function get_items_icon {
    rm -rf images
    mkdir images
    cd images
    for i in `grep '<img src="http://euw.leagueoflegends.com/sites/default/files/game_data/' ../items | grep champion | sed 's/<img src="//' | sed 's/" class="champion_icon">//'`
    do
	wget $i
    done
}

function gen_items_conf {
    rm -rf items.conf
    ./items_site_parse.py items > items.conf
}

get_items_site
gen_items_conf
get_items_icon

